1// Insert menu illustration scene
2// Created June-August 2001 by Christoph Hormann
3// Updated to 3.7 by Friedrich A. Lohmueller, June-2012.
4
5// ----- transformations submenu -----
6
7// -w120 -h48 +a0.1 +am2 -j +r3
8
9#version 3.7;
10global_settings{ assumed_gamma 1.0 }
11
12#include "colors.inc"
13
14
15//#declare Typ=1;     // translate
16//#declare Typ=2;     // rotate
17//#declare Typ=3;     // scale
18//#declare Typ=4;     // matrix
19
20
21global_settings {
22  //assumed_gamma 1
23  max_trace_level 5
24}
25
26light_source {
27  <1.5, 0.35, 1.0>*10000
28  color rgb 1.0
29}
30
31camera {
32  location    <10, 20, 7.5>
33  direction   y
34  sky         z
35  up          z
36  right       (120/48)*x
37  look_at     <0, 0, -0.2>
38  angle       28
39}
40
41sky_sphere {
42  pigment {
43    gradient y
44    color_map {
45      [0.0 rgb <0.6,0.7,1.0>]
46      [1.0 rgb <0.2,0.2,0.8>]
47    }
48  }
49}
50
51// ----------------------------------------
52
53plane
54{
55  z, -1
56  texture
57  {
58    pigment { color rgb 1 }
59    finish {
60      diffuse 0.7
61      specular 0.4
62      roughness 0.01
63
64      reflection { 0.5 , 1.0
65        fresnel on
66        metallic 0.8
67      }
68      conserve_energy
69
70    }
71  }
72}
73
74//---------------------------------------------------
75
76#declare Tex1=
77  texture {
78
79    #switch (Typ)
80      #case (1)
81        pigment { color NeonBlue }
82        #break
83      #case (2)
84        pigment { color ForestGreen }
85        #break
86      #case (3)
87        pigment { color Coral }
88        #break
89      #case (4)
90        pigment { color SpicyPink }
91    #end
92
93    finish { specular 0.4 roughness 0.02 }
94  }
95
96
97// =============================================
98
99#declare Obj=
100box {
101  #if (Typ=1)
102    <-0.4, -0.8, -0.8> <0.4, 0.8, 0.8>
103  #else
104    <-0.3, -0.8, -0.8> <0.3, 0.8, 0.8>
105  #end
106  texture { Tex1 }
107}
108
109// =============================================
110
111#if (Typ=1)
112
113#declare Cnt=0;
114
115#while (Cnt < 5)
116  object {
117    Obj
118    translate <-4.0+Cnt*2, 0.8, -1>
119    translate Cnt*0.5*z
120  }
121  #declare Cnt=Cnt+1;
122#end
123
124#end
125
126// =============================================
127
128#if (Typ=2)
129
130#declare Cnt=0;
131
132#while (Cnt < 5)
133  object {
134    Obj
135    rotate -Cnt*18*z
136    translate <-4.2+Cnt*2, 0, 0>
137  }
138  #declare Cnt=Cnt+1;
139#end
140
141#end
142
143// =============================================
144
145#if (Typ=3)
146
147#declare Cnt=0;
148
149#while (Cnt < 5)
150  object {
151    Obj
152    scale (Cnt+1)*0.3
153    translate <-4.2+Cnt*2, 0, 0>
154  }
155  #declare Cnt=Cnt+1;
156#end
157
158#end
159
160// =============================================
161
162#if (Typ=4)
163
164#declare Cnt=0;
165
166#while (Cnt < 5)
167  object {
168    Obj
169    matrix < 1, 0, 0,
170             0, 1, 0,
171	     Cnt*0.3, 0, 1,
172	     0, 0, 0>
173
174    translate <-4.2+Cnt*2, 0, 0>
175  }
176  #declare Cnt=Cnt+1;
177#end
178
179#end
180
181